{% extends 'generic/object_detail.html' %}
{% load helpers %}

{% block content_left_page %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>Interface</strong>
            </div>
            <table class="table table-hover panel-body attr-table">
                <tr>
                    <td>Virtual Machine</td>
                    <td>
                        <a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a>
                    </td>
                </tr>
                <tr>
                    <td>Name</td>
                    <td>{{ object.name }}</td>
                </tr>
                <tr>
                    <td>Enabled</td>
                    <td>
                        {% if object.enabled %}
                            <span class="text-success"><i class="mdi mdi-check-bold"></i></span>
                        {% else %}
                            <span class="text-danger"><i class="mdi mdi-close"></i></span>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <td>Description</td>
                    <td>{{ object.description|placeholder }} </td>
                </tr>
                <tr>
                    <td>MTU</td>
                    <td>{{ object.mtu|placeholder }}</td>
                </tr>
                <tr>
                    <td>MAC Address</td>
                    <td><span class="text-monospace">{{ object.mac_address|placeholder }}</span></td>
                </tr>
                <tr>
                    <td>802.1Q Mode</td>
                    <td>{{ object.get_mode_display }}</td>
                </tr>
            </table>
        </div>
{% endblock content_left_page %}

{% block content_full_width_page %}
    {% include 'panel_table.html' with table=ipaddress_table heading="IP Addresses" %}
    {% include 'panel_table.html' with table=vlan_table heading="VLANs" %}
{% endblock content_full_width_page %}
